import random
box = [[], [], []]
box_color = ["红", "黄", "蓝"]
qiu = []
for i in range(1, 10, 1):
    qiu.append(i)
for qiu in qiu: 
    index = random.randint(0, 2)
    box[index].append(qiu)
i = 0
for j in box: 
    print("%s袋子里球数个数为：%d个" % (box_color[i], len(j)))
    i = i + 1
    for number in j: 
        print("%s" % number, end='\t')
    print("\n")
print('分配结束', box)
